#ifndef MOVE_H
#define MOVE_H

#include <string>
#include "Position.h"
using namespace std;

class Move {
// properties
public:
	int from;
	int to;
    Piece piece;  // moved piece
    Piece cPiece; // captured piece
    char promotion;
// constructor
public:
	Move(int square1, int square2, Position & p);        
	Move(int square1, int square2, Position & p, char promotion);
	Move(Move & move);
	Move(string move, Position & p);
// functions
public:
	bool IsEqual(Move m);
	string ToString();
	int GetHashCode();
	bool IsCapture();

private:
	int evalMoveBruitality(Move move);
	int GetVal(Piece piece);
}

bool static operator==(Move m1, Move m2){
    return (m1.from==m2.from) && (m1.to==m2.to) && (m1.promotion==m2.promotion);
}

bool static operator!=(Move m1, Move m2)
{
    return (m1.from != m2.from) || (m1.to != m2.to) || (m1.promotion != m2.promotion);
}


#endif